﻿using FluentValidation;

namespace IdentityService.Webapi.Controllers.UserAdmin
{
    public record AddTeacherUserRequest(string UserName, string Name,string Password);

      public class AddTeacherUserRequesttValidator : AbstractValidator<AddTeacherUserRequest>
    {
        public AddTeacherUserRequesttValidator()
        {
            RuleFor(e => e.Name).NotNull().NotEmpty().MaximumLength(11);
            RuleFor(e => e.UserName).NotEmpty().NotEmpty().MaximumLength(20).MinimumLength(2);
            RuleFor(e => e.Password).NotEmpty().NotEmpty().MaximumLength(20).MinimumLength(2);
        }
    }
}
